package com.press.services;

import com.press.bean.CommentBean;
import com.press.mapper.CommentMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by YIJIE on 2016/10/14.
 */
@Service("commentService")
public class CommentService {
    @Resource(name = "commentMapper")
    private CommentMapper commentMapper;

    public CommentMapper getCommentMapper() {
        return commentMapper;
    }

    public void setCommentMapper(CommentMapper commentMapper) {
        this.commentMapper = commentMapper;
    }

    public List<CommentBean> getComment() {
        return commentMapper.getComment();
    }


    public List<CommentBean> getPublished() {
        return commentMapper.getPublished();
    }

    public List<CommentBean> getCheck() {
        return commentMapper.getCheck();
    }

    public List<CommentBean> getBinComment() {
        return commentMapper.getBinComment();
    }

    public String getcommentCount() {
        return commentMapper.getcommentCount();
    }

    public String publishedCount() {
        return commentMapper.publishedCount();
    }

    public String checkCount() {
        return commentMapper.checkCount();
    }

    public String commentBinCount() {
        return commentMapper.commentBinCount();
    }

    public boolean putStick(String comment_id) {
        return commentMapper.putStick(comment_id);
    }

    public boolean cancelStick(String comment_id) {
        return commentMapper.cancelStick(comment_id);
    }

    public boolean passComment(String comment_id) {
        return commentMapper.passComment(comment_id);
    }

    public boolean nopassComment(String comment_id) {
        return commentMapper.nopassComment(comment_id);
    }

    public boolean deleteComment(String comment_id) {
        return commentMapper.deleteComment(comment_id);
    }

    public boolean giveTrash(String comment_id) {
        return commentMapper.giveTrash(comment_id);
    }

    public boolean deleteAll(String[] comment) {
        return commentMapper.deleteAll(comment);
    }


    public CommentBean getCommentById(String comment_id) {
        return commentMapper.getCommentById(comment_id);
    }


    public boolean addReply(Map map) {
        return commentMapper.addReply(map);
    }
}
